home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / g / gnu_c / gpplib22.zoo / iosrc / ioperror.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-30  |  381 b   |  23 lines

  1. #include "libioP.h"
  2. #include <errno.h>
  3. #include <string.h>
  4. #ifndef errno
  5. extern int errno;
  6. #endif
  7.  
  8. #ifndef _IO_strerror
  9. extern char* _IO_strerror _PARAMS((int));
  10. #endif
  11.  
  12. void
  13. _IO_perror (s)
  14.      const char *s;
  15. {
  16.   char *error = _IO_strerror (errno);
  17.  
  18.   if (s != NULL && *s != '\0')
  19.     _IO_fprintf (_IO_stderr, "%s:", s);
  20.  
  21.   _IO_fprintf (_IO_stderr, "%s\n", error ? error : "");
  22. }
  23.